import java.io.File;

public class Demo3 {
    public static void scan(File file){
        if(!file.isDirectory()){
            return;
        }
        File[] f=file.listFiles();
        if(f==null||f.length==0){
            return;
        }
        System.out.println(file.getAbsolutePath());
        for(File f1:f){

            if(f1.isFile()){
                System.out.println(f1.getAbsolutePath());
            }
            else {
                scan(f1);
            }
        }

    }

    public static void main(String[] args) {
        File f=new File("./");
        scan(f);
    }
}
